/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.message.dao;

import java.util.Date;
import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.message.entity.SystemNotifyMessage;

/**
 * 系统提示信息DAO接口
 * @author lvbo
 * @version 2013-07-16
 */
public interface SystemNotifyMessageDao extends SystemNotifyMessageDaoCustom, CrudRepository<SystemNotifyMessage, Long> {

	@Query("FROM SystemNotifyMessage WHERE STORE_ID = ?1 AND ?2 between BEGIN_DATE AND END_DATE AND STATUS = 0")
	public List<SystemNotifyMessage> findUnReadMsg(Long storeId, Date date);

}

/**
 * DAO自定义接口
 * @author lvbo
 */
interface SystemNotifyMessageDaoCustom extends BaseDao<SystemNotifyMessage> {

}

/**
 * DAO自定义接口实现
 * @author lvbo
 */
@Component
class SystemNotifyMessageDaoImpl extends BaseDaoImpl<SystemNotifyMessage> implements SystemNotifyMessageDaoCustom {

}
